www.gusucode.com > 基于matlab编程蒙特卡罗仿真设计源码程序 > 基于matlab编程蒙特卡罗仿真设计源码程序/第二讲 MATLAB入门/fun1.m
function f=fun1(x) if x>1 f=x^2+1 end if x<=1 f=2*x end